package com.qfedu.aunt.commons.constance;

import java.util.concurrent.TimeUnit;

/**
 * @author xiaobobo
 * @title: RedisConstance
 * @projectName aunt_commons_2209
 * @description: 这个是放进我们的Redis中数据的前缀
 * @date 2022/11/4  10:22
 */
public class RedisConstance {

    //缓存预热广告的这个前缀
    private static  final String AD_TYPE_PREFIX="adType:";

    //这个是缓存的过期时间的配置
    private static  final int EXPIRE_TIME=5;

    //这个是缓存的过期时间单位
    private static  final TimeUnit EXPIRE_TIME_UNIT=TimeUnit.MINUTES;

    //这个家伙是为了防止别人拦截请求之后 来请求我们的服务器
    private static  final String REQ_RECORE="record:";

    //限流的前缀
    private static  final String LIMIT="limit:";

    private static  final String BLACK="black:";

    //这个用来存放请求过我们的系统的io地址
    private static  final String IP="ip";

    public static String getIP() {
        return IP;
    }

    public static String getBLACK() {
        return BLACK;
    }

    public static String getLIMIT() {
        return LIMIT;
    }

    public static String getReqRecore() {
        return REQ_RECORE;
    }

    public static int getExpireTime() {
        return EXPIRE_TIME;
    }

    public static TimeUnit getExpireTimeUnit() {
        return EXPIRE_TIME_UNIT;
    }
    public static String getAdTypePrefix() {
        return AD_TYPE_PREFIX;
    }
}
